From: Kim F. Storm Date: Tue, 4 May 2004 13:05:19 +0000 (+0000) Subject: (ido-read-internal): Fix call to read-file-name for edit. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~22717 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=93d577529c10a36c9d58f53c21566f883625b715;p=emacs.git (ido-read-internal): Fix call to read-file-name for edit. Must expand directory for completion to work; and don't mess with process-environment. --- diff --git a/lisp/ido.el b/lisp/ido.el index 6a66ce0388d..180e9dbb1c8 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1667,8 +1667,7 @@ If INITIAL is non-nil, it specifies the initial input string." ((memq ido-exit '(edit chdir)) (cond ((memq ido-cur-item '(file dir)) - (let* ((process-environment (cons "HOME=/" process-environment)) ;; cheat read-file-name - (read-file-name-function nil) + (let* ((read-file-name-function nil) (edit (eq ido-exit 'edit)) (d ido-current-directory) (f ido-text-init) @@ -1676,7 +1675,9 @@ If INITIAL is non-nil, it specifies the initial input string." (setq ido-text-init "") (while new (setq new (if edit - (read-file-name (concat prompt "[EDIT] ") d (concat d f) nil f) + (read-file-name (concat prompt "[EDIT] ") + (expand-file-name d) + (concat d f) nil f) f) d (or (file-name-directory new) "/") f (file-name-nondirectory new)